package com.huawei.appgallery.festivalanimation.particle.initializers;

import com.huawei.appgallery.festivalanimation.particle.Particle;
import com.huawei.appgallery.festivalanimation.particle.utils.RandomUtil;

public class RotationInitializer implements IParticleInitializer {
    private int mMaxAngle;
    private int mMinAngle;

    public RotationInitializer(int i, int i2) {
        this.mMinAngle = i;
        this.mMaxAngle = i2;
    }

    public void initParticle(Particle particle) {
        particle.mInitialRotation = this.mMinAngle == this.mMaxAngle ? (float) this.mMinAngle : (float) (RandomUtil.nextInt(this.mMaxAngle - this.mMinAngle) + this.mMinAngle);
    }
}
